<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模板引用</title>
    <script src="vue3.js"></script>
</head>
<body>
    <div id="app">
        <h1 ref="title">{{msg}}</h1>
        <div>
            <input ref="input_title" v-model="msg"/>
        </div>
        <button @click="handleClick">点击改变</button>
    </div>
    <script>
        let {createApp} = Vue
        createApp({
            data(){
               return {
                   msg: 'hello world'
               }
            },
            methods:{
                handleClick(){
                   let input_title = this.$refs.input_title
                    input_title.value = '12345'
                    console.log(input_title.value)
                }
            }
        }).mount('#app')
    </script>
</body>
</html>